package com.eclipse.organigram.preferences;

import org.eclipse.jface.preference.*;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.IWorkbench;

import com.eclipse.organigram.Activator;

public class OrganigramPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

	public OrganigramPreferencePage() {
		super(GRID);
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("Configure you organigram.");
	}
	
	public void createFieldEditors() {
		FileFieldEditor organigramPathEditor = new FileFieldEditor(PreferenceConstants.ORGANIGRAM_JSON_PATH, 
				"&Organigram JSON path:", true, getFieldEditorParent());
		organigramPathEditor.setFileExtensions(new String[] { "*.json" });
		addField(organigramPathEditor);
	}

	public void init(IWorkbench workbench) {
	}
	
}